<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>55.String扩展方法</title>
</head>
<body>
<script>
  //dot  .  元字符  除换行符以外的任意单个字符
  let str = `
        <ul>
            <li>
                <a>肖生克的救赎</a>
                <p>上映日期: 1994-09-10</p>
            </li>
            <li>
                <a>阿甘正传</a>
                <p>上映日期: 1994-07-06</p>
            </li>
        </ul>`;

  let reg = /<li>.*?<a>(.*?)<\/a>.*?<p>(.*?)<\/p>.*?<\/li>/gs
  //会将所有的都遍历出来
  let result = str.matchAll(reg)
  let result2 = [...result]
  console.log(result2)


</script>
</body>
</html>